(function(){

'use strict';

angular.module('controllers.faultLocation.pbossOm')
	.controller('consistencyAnalysisController', consistencyAnalysisController);

function consistencyAnalysisController($scope, pbossOmServer, reponsestate, COREDATA, requeststate,$filter) {
	$scope.shoumun = 0;
	pbossOmServer.queryConsistency();
	$scope.items = reponsestate.consisten;
	//查询条件参数数据类型
	$scope.dateTypes = [{
		dateTypeName: '用户信息',
		dateTypeCode: '01'
	}, {
		dateTypeName: 'EC信息',
		dateTypeCode: '01'
	}, {
		dateTypeName: '基础通讯白名单信息',
		dateTypeCode: '01'
	}, {
		dateTypeName: 'HRL用户信息',
		dateTypeCode: '01'
	}, {
		dateTypeName: '个人订购信息',
		dateTypeCode: '01'
	}, {
		dateTypeName: 'EC成员订购关系',
		dateTypeCode: '01'
	}, {
		dateTypeName: '行车卫士用户信息',
		dateTypeCode: '01'
	}];
	$scope.endRegions = [{
		endRegionName: '4A系统',
		endRegionCode: '01'
	}, {
		endRegionName: '省BOSS系统',
		endRegionCode: '01'
	}, {
		endRegionName: '内容计费结算系统',
		endRegionCode: '01'
	}, {
		endRegionName: '一级数据中心',
		endRegionCode: '01'
	}, {
		endRegionName: '卡数据生成系统',
		endRegionCode: '01'
	}, {
		endRegionName: 'HRL',
		endRegionCode: '01'
	}, {
		endRegionName: '中央SIM',
		dateTypeCode: '01'
	}];
	$scope.endAgencys = [{
		endAgeencyName: '全部',
		endAgencyCode: '01'
	}];
	$scope.consistency = {};
	$scope.consistency.endAgency = '01';
	$scope.consistency.viweType = '01';
	$scope.viweTypes = [{
		viweTypeName: '全部',
		viweTypeCode: '01'
	}, {
		viweTypeName: '增量',
		viweTypeCode: '02'
	}, {
		viweTypeName: '全量',
		viweTypeCode: '03'
	}, ];
	$scope.consistency.startTime = new Date();
	$scope.consistency.endTime = new Date();

	$scope.queryAllChannel = function() {
		$scope.shoumun == 1 ? $scope.shoumun = 0 : $scope.shoumun = 1;
		if ($scope.shoumun === 0) {
			pbossOmServer.queryConsistency();
			$scope.items = reponsestate.consisten;
		}
	};

	$scope.excelExport = COREDATA.FORMPREFIX+ 'OMdisplay/PBossOM/dataConsistency/export'
	/*$scope.ExportList = requeststate.consistencyAnalysis;*/
	/*$scope.ExportList.startTime = $filter('date')($scope.consistency.startTime,'yyyy-MM-dd');
    $scope.ExportList.endTime = $filter('date')($scope.consistency.endTime,'yyyy-MM-dd');*/
     $scope.ExportList.title = '数据一致性差异统计'+$filter('date')($scope.consistency.startTime,'yyyy-MM-dd');+'至'+ $filter('date')($scope.consistency.endTime,'yyyy-MM-dd');
  
}
consistencyAnalysisController.$inject = ['$scope', 'pbossOmServer', 'reponsestate', 'COREDATA', 'requeststate','$filter'];

})();